3.163 \(\int \cos ^4(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=61 \[ \frac {(3 a+4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {1}{8} x (3 a+4 b)+\frac {a \sin (e+f x) \cos ^3(e+f x)}{4 f} \]

[Out]

1/8*(3*a+4*b)*x+1/8*(3*a+4*b)*cos(f*x+e)*sin(f*x+e)/f+1/4*a*cos(f*x+e)^3*sin(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4045, 2635, 8} \[ \frac {(3 a+4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {1}{8} x (3 a+4 b)+\frac {a \sin (e+f x) \cos ^3(e+f x)}{4 f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^4*(a + b*Sec[e + f*x]^2),x]

[Out]

((3*a + 4*b)*x)/8 + ((3*a + 4*b)*Cos[e + f*x]*Sin[e + f*x])/(8*f) + (a*Cos[e + f*x]^3*Sin[e + f*x])/(4*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 4045

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rubi steps

\begin {align*} \int \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {1}{4} (3 a+4 b) \int \cos ^2(e+f x) \, dx\\ &=\frac {(3 a+4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {1}{8} (3 a+4 b) \int 1 \, dx\\ &=\frac {1}{8} (3 a+4 b) x+\frac {(3 a+4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 45, normalized size = 0.74 \[ \frac {4 (3 a+4 b) (e+f x)+8 (a+b) \sin (2 (e+f x))+a \sin (4 (e+f x))}{32 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^4*(a + b*Sec[e + f*x]^2),x]

[Out]

(4*(3*a + 4*b)*(e + f*x) + 8*(a + b)*Sin[2*(e + f*x)] + a*Sin[4*(e + f*x)])/(32*f)

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 49, normalized size = 0.80 \[ \frac {{\left (3 \, a + 4 \, b\right )} f x + {\left (2 \, a \cos \left (f x + e\right )^{3} + {\left (3 \, a + 4 \, b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/8*((3*a + 4*b)*f*x + (2*a*cos(f*x + e)^3 + (3*a + 4*b)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

giac [A]  time = 1.15, size = 79, normalized size = 1.30 \[ \frac {{\left (f x + e\right )} {\left (3 \, a + 4 \, b\right )} + \frac {3 \, a \tan \left (f x + e\right )^{3} + 4 \, b \tan \left (f x + e\right )^{3} + 5 \, a \tan \left (f x + e\right ) + 4 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2}}}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

1/8*((f*x + e)*(3*a + 4*b) + (3*a*tan(f*x + e)^3 + 4*b*tan(f*x + e)^3 + 5*a*tan(f*x + e) + 4*b*tan(f*x + e))/(
tan(f*x + e)^2 + 1)^2)/f

________________________________________________________________________________________

maple [A]  time = 1.29, size = 65, normalized size = 1.07 \[ \frac {a \left (\frac {\left (\cos ^{3}\left (f x +e \right )+\frac {3 \cos \left (f x +e \right )}{2}\right ) \sin \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+b \left (\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^4*(a+b*sec(f*x+e)^2),x)

[Out]

1/f*(a*(1/4*(cos(f*x+e)^3+3/2*cos(f*x+e))*sin(f*x+e)+3/8*f*x+3/8*e)+b*(1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e
))

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 73, normalized size = 1.20 \[ \frac {{\left (f x + e\right )} {\left (3 \, a + 4 \, b\right )} + \frac {{\left (3 \, a + 4 \, b\right )} \tan \left (f x + e\right )^{3} + {\left (5 \, a + 4 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/8*((f*x + e)*(3*a + 4*b) + ((3*a + 4*b)*tan(f*x + e)^3 + (5*a + 4*b)*tan(f*x + e))/(tan(f*x + e)^4 + 2*tan(f
*x + e)^2 + 1))/f

________________________________________________________________________________________

mupad [B]  time = 4.48, size = 67, normalized size = 1.10 \[ x\,\left (\frac {3\,a}{8}+\frac {b}{2}\right )+\frac {\left (\frac {3\,a}{8}+\frac {b}{2}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {5\,a}{8}+\frac {b}{2}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+2\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)^4*(a + b/cos(e + f*x)^2),x)

[Out]

x*((3*a)/8 + b/2) + (tan(e + f*x)^3*((3*a)/8 + b/2) + tan(e + f*x)*((5*a)/8 + b/2))/(f*(2*tan(e + f*x)^2 + tan
(e + f*x)^4 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \cos ^{4}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**4*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*cos(e + f*x)**4, x)

________________________________________________________________________________________